import Vue from 'vue';
import Router from 'vue-router';

const loginPage = resolve => require(['@/page/common/login-page'], resolve)
const rechargePassword = resolve => require(['@/page/common/recharge-password'], resolve)

const orderDetail = resolve => require(['@/page/orderManage/orderDetail'], resolve)
const orderList = resolve => require(['@/page/orderManage/orderList'], resolve)
const goodDetail = resolve => require(['@/page/goodManage/goodDetail'], resolve)
const goodList = resolve => require(['@/page/goodManage/goodList'], resolve)
const roleList = resolve => require(['@/page/systemManage/roleList'], resolve)
const roleEdit = resolve => require(['@/page/systemManage/roleEdit'], resolve)
const accountList = resolve => require(['@/page/systemManage/accountList'], resolve)
const accountEdit = resolve => require(['@/page/systemManage/accountEdit'], resolve)
const saleManList = resolve => require(['@/page/saleManage/saleManList'], resolve)
const saleManDetail = resolve => require(['@/page/saleManage/saleManDetail'], resolve)
const entryList = resolve => require(['@/page/saleManage/entryList'], resolve)
const entryDetail = resolve => require(['@/page/saleManage/entryDetail'], resolve)
const authorizationList = resolve => require(['@/page/saleManage/authorizationList'], resolve)
const applicationsList = resolve => require(['@/page/saleManage/applicationsList'], resolve)
const distributorList = resolve => require(['@/page/distributorManage/distributorList'], resolve)
const distributorDetail = resolve => require(['@/page/distributorManage/distributorDetail'], resolve)
const companyEdit = resolve => require(['@/page/companyManage/companyEdit'], resolve)

Vue.use(Router)
export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/loginPage',
      name: 'loginPage',
      component: loginPage
    },
    {
      path: '/rechargePassword',
      name: 'rechargePassword',
      component: rechargePassword
    },
    {
      path: '/',
      name: 'orderList',
      component: orderList
    },
    {
      path: '/orderDetail',
      name: 'orderDetail',
      component: orderDetail
    },
    {
      path: '/goodList',
      name: 'goodList',
      component: goodList
    },
    {
      path: '/goodDetail',
      name: 'goodDetail',
      component: goodDetail
    },
    
    {
      path: '/roleList',
      name: 'roleList',
      component: roleList
    },
    {
      path: '/roleEdit',
      name: 'roleEdit',
      component: roleEdit
    },
    {
      path: '/accountList',
      name: 'accountList',
      component: accountList
    },
    {
      path: '/accountEdit',
      name: 'accountEdit',
      component: accountEdit
    },
    {
      path: '/saleManList',
      name: 'saleManList',
      component: saleManList
    },
    {
      path: '/saleManDetail',
      name: 'saleManDetail',
      component: saleManDetail
    },
    {
      path: '/entryList',
      name: 'entryList',
      component: entryList
    },
    {
      path: '/entryDetail',
      name: 'entryDetail',
      component: entryDetail
    },
    {
      path: '/authorizationList',
      name: 'authorizationList',
      component: authorizationList
    },
    {
      path: '/applicationsList',
      name: 'applicationsList',
      component: applicationsList
    },
    {
      path: '/distributorList',
      name: 'distributorList',
      component: distributorList
    },
    {
      path: '/distributorDetail',
      name: 'distributorDetail',
      component: distributorDetail
    },
    {
      path: '/companyEdit',
      name: 'companyEdit',
      component: companyEdit
    }]
})
